-
Notifications
You must be signed in to change notification settings - Fork 62
cache metric data in metrics collector #379
Conversation
Hey boyang9527! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA. |
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/160162079 The labels on this github issue will be updated when the story is started. |
if l > r { | ||
return l | ||
} | ||
m := (l + r) / 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m:=l/2+r/2 or m:= l + (r - l)/2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
cache.Put(TestTSD{50, nil}) | ||
result, ok = cache.Query(35, 50, labels) | ||
Expect(ok).To(BeTrue()) | ||
Expect(result).To(Equal([]TSD{TestTSD{40, nil}})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why query database directly, the "end" timestamp is included. Is that possible to make the implementation compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change made in https://github.com/cloudfoundry-incubator/app-autoscaler/pull/379/files#diff-689f77dbaf45e61a44746cb0b0ff27baR138
mtrcs, ok := h.queryFunc(appId, start, end+1, order, labels)
use start, end+1 to query cache will make sure you get metrics data in [start, end]
LGTM |
* Consolidate all db maintenance of pruner to operator (#368) * Consolidate all db maintenance of pruner to operator * update per comments * wrong sample request in docs (#374) * Bug fix in liquibase change set when rename pruner to operator * Added DB schema for custom-metrics credentials management (#373) * Added DB schema for custom-metrics credentials management * Deleted binding_id column * Update api.db.changelog.yml * adapt public rest api to cf style (#371) * adapt public rest api to cf style [#159391488] * both order-direction and order are valid to compatible with old version * page * refactor router helper and update prevUrl&nextUrl method * add test cases for function getPageUrl * test case update * Instance metrics can be queried by instance index (#377) * Instance metrics can be queried by instance index [#159756219] * when instance-index is not provided, returns instance metrics of all instances * update for comments * update for comments * Added custom metrics binding credential generation and management in APIServer (#376) * Custom Metrics broker api changes * Modified Integration Test * Minor update * Incorporated Review comments * Updated Integration tests * credentials generated during binding without policy * Rechecking database for invalid credential cache entry * Incorporated Review comments * refactor config of go components (#378) * Add maven dependencies to scheduler to be compatible with JAVA9 or higher versions. (#380) [#160224877] * Check user authorization in apiserver with cc token_point instead of authorization_endpoint (#382) [#160438532] * prune non-existent application details (#381) * synchronize application details * Pruning apps only for CF-AppNotFound type of error * pruning of app is restricted to only 404 statusCode * Updated to incorporate review comments * cache metric data in metrics collector (#379) * cache metric data in metrics collector * update based on review comments * fix the race condition in test (#386) * Add http connection timeout as a configuration to all autoscaler components (#387) * Add http connection timeout as a configuration to all autoscaler components [#160241806] * rename http_request_timeout to http_client_timeout * typo * override tcp dial timeout of cfhttp httpclient (#389) * Added validation to restrict threshold value to be integer only (#392) * [auth] allow admin to access autoscaler (#393) * [auth] allow admin to access autoscaler * [auth] check token via uaa * [auth] add test cases * [auth] supplement test cases * [auth] update test * [auth] [7]string -> []string * Add db connection limitation configurations to scheduler (#395) [#161710050] * Add health endpoint for go component (#394) * Add health endpoint for go component * update for comments * Add health endpoint for scheduler (#397) [#161745454] * unify all the golang fakes (#398) [#161774071] * cut off duration of operator should be any duration rather than days (#399) * cut off duration of operator should be any duration rather than days [#161834647] * the default cut off duration is 30 days * enable cpu metric collection * Configuration enhancement for scheduler to prevent logjam vulnerability (#400) [#161873300] * Updated metric_type schema to support custom metrics (#404) * Updated metric_type schema to support custom metrics - metric_type can be alphanumeric characters and it can also have underscores * Updated apiserver policy validation * enhance integration test for bug "TLS handshake error between operator and scheduler" (#405) [#162230075]
No description provided.